<html>
<head><meta charset="utf-8"><title>json messages for test progress · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/json.20messages.20for.20test.20progress.html">json messages for test progress</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="221215157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/json%20messages%20for%20test%20progress/near/221215157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/json.20messages.20for.20test.20progress.html#221215157">(Dec 30 2020 at 14:15)</a>:</h4>
<p>I have been hacking on a partial solution to <a href="https://github.com/rust-lang/cargo/issues/8903">https://github.com/rust-lang/cargo/issues/8903</a>. In particular, I'm looking into outputting messages about starting a test executable and whether it exited with success or failure, as well as its output lines. Something along the lines of:</p>
<div class="codehilite" data-code-language="JSON"><pre><span></span><code><span class="p">{</span><span class="nt">"reason"</span><span class="p">:</span><span class="s2">"test-run"</span><span class="p">,</span><span class="nt">"package_id"</span><span class="p">:</span><span class="s2">"foo 0.0.1 (path+file:///snip)"</span><span class="p">,</span><span class="nt">"manifest_path"</span><span class="p">:</span><span class="s2">"/snip/target/cit/t1911/foo/Cargo.toml"</span><span class="p">,</span><span class="nt">"executable"</span><span class="p">:</span><span class="s2">"/snip/target/debug/deps/a-3f067ca8eb8887bc"</span><span class="p">,</span><span class="nt">"arguments"</span><span class="p">:[],</span><span class="nt">"status"</span><span class="p">:</span><span class="s2">"succeeded"</span><span class="p">,</span><span class="nt">"duration"</span><span class="p">:</span><span class="mf">0.003849306</span><span class="p">}</span>
<span class="p">{</span><span class="nt">"reason"</span><span class="p">:</span><span class="s2">"test-run"</span><span class="p">,</span><span class="nt">"package_id"</span><span class="p">:</span><span class="s2">"foo 0.0.1 (path+file:///snip)"</span><span class="p">,</span><span class="nt">"manifest_path"</span><span class="p">:</span><span class="s2">"/snip/target/cit/t1911/foo/Cargo.toml"</span><span class="p">,</span><span class="nt">"executable"</span><span class="p">:</span><span class="s2">"/snip/target/debug/deps/z-55a8a5e7bec13ccd"</span><span class="p">,</span><span class="nt">"arguments"</span><span class="p">:[],</span><span class="nt">"status"</span><span class="p">:</span><span class="s2">"started"</span><span class="p">}</span>
</code></pre></div>
<p>I'm finding that it will require non-trivial changes to the test runner, so I figured I should look into doing this in the right order.</p>
<p>First things first, is there anybody here who would consider this just an outright a bad idea? And also, do we want an RFC or some other design process to happen before I work on refactoring cargo's test subcommand?</p>



<a name="221215259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/json%20messages%20for%20test%20progress/near/221215259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/json.20messages.20for.20test.20progress.html#221215259">(Dec 30 2020 at 14:16)</a>:</h4>
<p>I have no idea how decision making and or major changes happen in T-cargo-land.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>